﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="InterfacePropertyManagement.aspx.cs"
    Inherits="Medianamik.UI.TypeManagement.InterfacePropertyManagement" MasterPageFile="/Medianamik/MasterPages/MedianamikModule.Master"
    ValidateRequest="false" %>

<asp:Content ID="ContextMenuContent" ContentPlaceHolderID="ContextMenu" runat="server">
    <asp:LinkButton ID="SaveButton" runat="server" CssClass="Action BtSauvegarder" OnClick="SaveButton_Click"
        Text="<%$ Resources : Medianamik_Global, SaveButtonText %>" />
    <a href="<%= ReturnUrl %>" class="Action BtAnnuler"><%=Resources("Medianamik_Global", "Cancel") %></a>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:ValidationSummary ID="valSummary" EnableClientScript="false" runat="server" CssClass="ValidationSummary" />
    
    <span class="ChampObligatoire">*</span>&nbsp;<label class="EditionPage"><%=Resources("medianamik_typemanagement", "InterfacePropertyName")%>
   <asp:PlaceHolder ID="NamePlaceHolder" runat="server">
        <asp:RequiredFieldValidator ID="NameRequired" runat="server" ControlToValidate="InterfacePropertyName"
            ErrorMessage="<%$ Resources: medianamik_typemanagement, InterfacePropertyNameRequired %>" Display="None" />
        <asp:RegularExpressionValidator ID="InterfacePropertyNameValidator" EnableClientScript="false" runat="server"
            ControlToValidate="InterfacePropertyName" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, InterfacePropertyNameIsInvalid %>"
            Display="None" ValidationExpression="[A-Z][a-zA-Z]*" />
        <asp:CustomValidator ID="UniqueInterfacePropertyNameValidator" runat="server" ErrorMessage="<%$ Resources: Medianamik_TypeManagement, InterfacePropertyNameAlreadyExists %>"
            OnServerValidate="ValidateUniqueInterfacePropertyName" Display="None" /></label>
        <p><asp:TextBox ID="InterfacePropertyName" runat="server" CssClass="TxtBox" /></p><br />
    </asp:PlaceHolder>
    <asp:PlaceHolder runat="server" ID="NameChoicePlaceHolder" Visible="false">
        <asp:RequiredFieldValidator ID="NameChoiceRequired" runat="server" ControlToValidate="NameChoice"
            ErrorMessage="<%$ Resources: medianamik_typemanagement, InterfacePropertyNameRequired %>" Display="None" />
        <p><asp:DropDownList ID="NameChoice" AutoPostBack="true" OnSelectedIndexChanged="NameChoiceChanged" runat="server" DataValueField="Name" DataTextField="Name" CssClass="SelectList" /></p><br />
    </asp:PlaceHolder>
    <asp:PlaceHolder ID="DataTypePlaceHolder" runat="server">
    <label class="EditionPage"><span class="ChampObligatoire">* </span><%=Resources("Medianamik_TypeManagement", 
        "DataType") %><asp:RequiredFieldValidator 
        EnableClientScript="false" ID="DataTypeRequired" runat="server" ControlToValidate="DataTypeChoice" 
        ErrorMessage="<%$ Resources : Medianamik_TypeManagement, DataTypeRequired %>" Display="None" /></label>
	<p><asp:DropDownList ID="DataTypeChoice" AutoPostBack="true" OnSelectedIndexChanged="DataTypeChoiceChanged" runat="server" DataValueField="ID" DataTextField="SQLDataTypeName" CssClass="SelectList" /></p><br />
    </asp:PlaceHolder>
    <asp:PlaceHolder ID="LookupPlaceHolder" runat="server" Visible="false">
        <label class="EditionPage"><span class="ChampObligatoire">* </span><%=Resources("Medianamik_TypeManagement", "LookupType") %><asp:RequiredFieldValidator EnableClientScript="false" ID="reqLookupTypes" runat="server" ControlToValidate="LookupTypeChoice" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, LookupTypeRequired %>" Display="None" /></label>
        <p><asp:DropDownList ID="LookupTypeChoice" runat="server" DataValueField="ID" DataTextField="Name" CssClass="SelectList" /></p>
    </asp:PlaceHolder>
    <asp:PlaceHolder ID="LengthPlaceHolder" runat="server" Visible="false">
        <label class="EditionPage"><span class="ChampObligatoire">* </span><%=Resources("Medianamik_TypeManagement", "Length") %><asp:RequiredFieldValidator ID="LengthRequired" runat="server" ControlToValidate="Length" EnableClientScript="false"
        ErrorMessage="<%$ Resources: medianamik_typemanagement, InterfacePropertyMaxLengthRequired %>" Display="None" /><asp:RegularExpressionValidator EnableClientScript="false" ID="regLength" runat="server" ControlToValidate="Length" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, LengthIsInvalid %>" Display="None" ValidationExpression="^[1-9][0-9]?[0-9]?[0-9]?$" /><asp:CustomValidator ID="InterfacePropertyLengthValidator" runat="server"
            ControlToValidate="Length" OnServerValidate="ValidateInterfacePropertyLength" Display="None" /></label>
        <p><asp:TextBox ID="Length" runat="server" CssClass="TxtBox" MaxLength="4" /></p><br />
    </asp:PlaceHolder>
    <p><med:TranslatorBox runat="server" ID="LabelTranslatorBox" Required="true" 
       ErrorMessage='<%$ Resources: medianamik_typemanagement, TranslationRequired %>' /></p><br />
       
    <label class="EditionPage"><%=Resources("medianamik_typemanagement", "Description") %></label><p>
    
    <asp:TextBox CssClass="TxtBox" runat="server" ID="InterfacePropertyDescription" TextMode="MultiLine" /></p><br />
    
    <p><span class="ChampObligatoire">*</span>&nbsp;<%=Resources("Medianamik_Global", "RequiredField") %></p>
</asp:Content>